<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>   
<%@ page import="java.util.*"  %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%
String path=request.getContextPath();
%>
<script type="text/javascript">
/* $(function(){
	var checkStatusFlag=document.getElementById("checkStatusFlag").value;
	if(checkStatusFlag=='0'){
		alert('该学校处于审核状态，不能进行修改，点击确定关闭本页！');
		
	}
}) */

</script>

<h2 class="contentTitle">修改</h2>

<body>
<div class="pageContent">
	
	<form method="post" id="form1" action="schoolAction!updateSchool.action" class="pageForm required-validate" onsubmit="return validateCallback(this,navTabAjaxDone)">
		<div class="pageFormContent nowrap" layoutH="97">
			<input type="hidden" name="hsSchoolInfo.sclId" value="${hsSchoolInfo.sclId}"/>
			<input type="hidden" name="hsSchoolInfo.sclPhone" value="${hsSchoolInfo.sclPhone}"/>
			<input type="hidden" name="hsSchoolInfo.sclSummary" value="${hsSchoolInfo.sclSummary}"/>
			<input type="hidden" name="hsSchoolInfo.sclNumber" value="${hsSchoolInfo.sclNumber}"/>
			<input type="hidden" name="hsSchoolInfo.sclSpell" value="${hsSchoolInfo.sclSpell}"/>
			<input type="hidden" name="hsSchoolInfo.dKeyA" value="${hsSchoolInfo.dKeyA}"/>
			<input type="hidden" name="hsSchoolInfo.dKeyB" value="${hsSchoolInfo.dKeyB}"/>
			<input type="hidden" name="hsSchoolInfo.bKeyA" value="${hsSchoolInfo.bKeyA}"/>
			<input type="hidden" name="hsSchoolInfo.bKeyB" value="${hsSchoolInfo.bKeyB}"/>
			<input type="hidden" name="hsSchoolInfo.inviteLastTime" value="${hsSchoolInfo.inviteLastTime}"/>
			<input type="hidden" name="hsSchoolInfo.sclStatusFlag" value="${hsSchoolInfo.sclStatusFlag}"/>
			<dl>
				<dt>所属地区：</dt>
				<dd>
					<select  name="hsSchoolInfo.areaCode" id="areacode" class="combox" nullmsg="所属地区" datatype="s" sucmsg="&nbsp;">
		                  <c:forEach items="${areaList}" var="area">   
		                         <option value="${area.areaCode}" <c:if test="${area.areaCode eq school.areaCode}">selected</c:if>>${area.areaName}</option>
                          </c:forEach>
		              </select>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>学校名称：</dt>
				<dd>
					<input type="text" name="hsSchoolInfo.sclName" id="sclname" class="required"   value="${hsSchoolInfo.sclName}" nullmsg="学校名称不能为空" datatype="*" sucmsg="&nbsp;"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>管理员姓名：</dt>
				<dd>
					 <input type="text" name="isuPhone" disabled id="isuName" class="required"  value="${sclManager.osuName}" nullmsg="管理员姓名不能为空" datatype="s" sucmsg="&nbsp;" />
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>管理员电话：</dt>
				<dd>
					 <input type="text" name="isuPhone" id="isuPhone" disabled class="required phone"  value="${sclManager.osuPhone}" nullmsg="管理员电话不能为空" datatype="phoneReg" errormsg="电话格式错误" sucmsg="&nbsp;" />
					<span class="info"></span>
				</dd>
			</dl>
			
			<dl>
				<dt>学校领导:</dt>
				<dd>
					<input type="text" name="hsSchoolInfo.sclLeaderName" id="sclLeaderName"  class="required"  value="${hsSchoolInfo.sclLeaderName }" nullmsg="学校领导不能为空" datatype="s" sucmsg="&nbsp;" />
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>学校领导电话：</dt>
				<dd>
					<input type="text" name="hsSchoolInfo.sclLeaderPhone" id="sclLeaderPhone" class="required phone"  value="${hsSchoolInfo.sclLeaderPhone}" nullmsg="学校领导电话不能为空" datatype="phoneReg" errormsg="电话格式错误" sucmsg="&nbsp;" />
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>学校地址：</dt>
				<dd>
					<input type="text" name="hsSchoolInfo.sclAddr" id="sclAddr"  class="required"  value="${hsSchoolInfo.sclAddr}"/>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>发卡方：</dt>
				<dd>
					<select class="combox" name="hsSchoolRelation.cardIssusrFlag" id="cardIssusrFlag" >
						  <option value="0" <c:if test="${hsSchoolRelation.cardIssusrFlag=='0'}">selected</c:if>>第三方</option>
						  <option value="1" <c:if test="${hsSchoolRelation.cardIssusrFlag=='1'}">selected</c:if>>我公司</option>
		              </select>
					<span class="info">如果是我公司发卡，该卡会被加密，第三方卡不会被加密</span>
				</dd>
			</dl>
			<dl>
				<dt>卡预留扇区号：</dt>
				<dd>
					<select class="combox" name="hsSchoolInfo.cardReservedArea" id="reservedArea">
							<c:forEach var="i" begin="0" end="15" step="1">
							      <option value='${i}' <c:if test="${i==hsSchoolInfo.cardReservedArea}">selected</c:if>>${i}</option>
							</c:forEach>
		              </select>
					<span class="info">卡预留扇区不会被加密，供其他厂商使用，默认为15扇区</span>
				</dd>
			</dl>
			<dl>
				<dt>射频卡：</dt>
				<dd>
					 <select class="combox" name="hsSchoolRelation.cardTypeFlag" id="cardTypeFlag" nullmsg="请选择射频卡" datatype="s"  sucmsg="&nbsp;">
						  <option value="0" <c:if test="${hsSchoolRelation.cardTypeFlag=='0'}">selected</c:if>>否</option>
						  <option value="1" <c:if test="${hsSchoolRelation.cardTypeFlag=='1'}">selected</c:if>>是</option>
		              </select>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>销售人员：</dt>
				<dd>
					<input type="text" name="saleName" id="saleName" disabled class="required" value="${sale.isuName }"/>
					<span class="info">本学校由哪个销售人员负责</span>
				</dd>
			</dl>
			<dl>
				<dt>移动客户经理：</dt>
				<dd>
		              <input type="text" name="saleName" id="saleName" disabled class="required" value="${sale.isuName }-${fn:substring(sale.isuPhone,fn:length(sale.isuPhone)-4,fn:length(sale.isuPhone))}"/>
					<span class="info">姓名+手机号码后4位</span>
				</dd>
			</dl>
			<dl>
				<dt>激励方式：</dt>
				<dd>
					<select class="combox required" name="hsSchoolRelation.marketingTypeFlag" id="marketingTypeFlag" nullmsg="请选择激励方式" datatype="s"  sucmsg="&nbsp;" onchange="change()">
			                      <option value="">--请选择--</option>
				                  <c:forEach items="${marketingTypeFlagList}" var="dic">
				       					<option value="${dic.dicCode}" <c:if test="${hsSchoolRelation.marketingTypeFlag eq dic.dicCode}">selected</c:if>>${dic.dicName }</option>
				       			  </c:forEach>
			         </select>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>结算方式：</dt>
				<dd>
					 <select class="combox required"  name="hsSchoolRelation.balanceTypeFlag" id="balanceTypeFlag" nullmsg="请选择结算方式" datatype="s"  sucmsg="&nbsp;" 
					 <c:if test="${hsSchoolInfo.checkStatusFlag=='1'}">readonly</c:if>>
			                      <option value="">--请选择--</option>
				                  <c:forEach items="${balanceTypeFlagList}" var="dic">
				       					<option value="${dic.dicCode}" <c:if test="${hsSchoolRelation.balanceTypeFlag eq dic.dicCode}">selected</c:if>
				       					  
				       					>${dic.dicName }</option>
				       			  </c:forEach>
			         </select>
					<span class="info"></span>
				</dd>
			</dl>
			<dl>
				<dt>审核状态：</dt>
				<dd>
				    <input type="hidden" id="checkStatusFlag" value="${hsSchoolInfo.checkStatusFlag}"/>
					<c:if test="${hsSchoolInfo.checkStatusFlag==1}"><span style="color:green">已审核</span></c:if>
			        <c:if test="${hsSchoolInfo.checkStatusFlag==0}"><span style="color:red">未审核</span></c:if>
					<span style="color:#7F7F7F">已审核的学校只允许总经办修改激励方式和结算方式</span>
				</dd>
			</dl>
			<dl id="div1">
				<dt>其它类激励方式详述：</dt>
				<dd>
				    <textarea name="hsSchoolRelation.marketingContent" class="textInput" id="marketingContent"   cols="20" rows="4" 
		              datatype="otherRewardType" nullmsg="详述不能为空" 
		              errormsg="其它类激励方式详述不能少于30个汉字" sucmsg="&nbsp;">${hsSchoolRelation.marketingContent}</textarea>
		              <span class="info"></span>
		              <span style="color:#7F7F7F">如果激励方式选择“其它”，则此选项不能为空且不能少于30</span>
				</dd>
			</dl>
			<%-- <div class="control-group">
		          <label class="control-label" for="hsSclintroduction">其它类激励方式详述：</label>
		          <div class="controls">
		              <textarea name="schoolRelation.checkStatusFlagcheckStatusFlag" id="hsSclintroduction"  class="span5" rows="5" 
		              datatype="otherRewardType" nullmsg="详述不能为空" 
		              errormsg="其它类激励方式详述不能少于30个汉字" sucmsg="&nbsp;">${schoolRelation.checkStatusFlag}</textarea>
		              <span class="Validform_checktip"></span>
		              <p class="help-block">如果激励方式选择“其它”，则此选项不能为空<br/>并且详述不能少于30个汉字</p>
		          </div>
			</div> --%>
			<!-- <div class="divider"></div> -->
			
		</div>
		<div class="formBar">
			<ul>
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit" >保存</button></div></div></li>
				<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
			</ul>
		</div>
	</form>
	
</div>
</body>
<script type="text/javascript">
function customvalidXxx(element){
	if ($(element).val() == "xxx") return false;
	return true;
}

function change(){
	var marketingTypeFlag=document.getElementById("marketingTypeFlag");
	var marketingContent=document.getElementById("marketingContent");
	if(marketingTypeFlag.value=='3'){
		marketingContent.className="required";
		marketingContent.setAttribute("minLength","30");
		document.getElementById("div1").style.display="block";
	}else{
		marketingContent.className="textInput";
	}
}
</script>

   
